<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>AiDu登录页面</title>
    <script type="text/javascript">

    </script>
</head>
<body>
<div align="center">
    <h2>欢迎访问AiDu贴吧</h2>
    <form action="${pageContext.request.contextPath}/login.do" method="get">
        <label for="name">用户名：</label><input type="text" name="name" id="name"><br>
        <label for="password">密码：</label><input type="password" name="password" id="password"><br>
        请选择你的身份:
        <input type="radio" name="identity" value="管理员" id="管理员"><label for="管理员">管理员</label>
        <input type="radio" name="identity" value="用户" id="用户"><label for="用户">用户</label><br>
        <%if (request.getSession().getAttribute("error") != null) {%>
        <%=request.getSession().getAttribute("error")%>
        <%request.getSession().removeAttribute("error");%>
        <%}%>
        <%if (request.getSession().getAttribute("ModifyUserNameSuccess") != null) {%>
        <%=request.getSession().getAttribute("ModifyUserNameSuccess")%>
        <%request.getSession().removeAttribute("ModifyUserNameSuccess");%>
        <%}%>
        <%if (request.getSession().getAttribute("ModifyPasswordSuccess") != null) {%>
        <%=request.getSession().getAttribute("ModifyPasswordSuccess")%>
        <%request.getSession().removeAttribute("ModifyPasswordSuccess");%>
        <%}%>
        <%if (request.getSession().getAttribute("registerSuccess") != null) {%>
        <%=request.getSession().getAttribute("registerSuccess")%>
        <%request.getSession().removeAttribute("registerSuccess");%>
        <%}%>
        <input type="submit" value="登录">
        <a href="register.jsp">用户注册</a>
    </form>
</div>
</body>
</html>
